<?php

class RoleManager extends TModule
{
	public static $PARTICIPANT_ROLE		= 'participant';
	public static $ORGANIZER_ROLE		= 'organizer';
	public static $COMMITTEE_ROLE		= 'committee';
	public static $ADMIN_ROLE			= 'admin';
	
	// -------------------- basic functions --------------------
	public function getRoleById($id)
	{
		return RoleRecord::finder()->findById($id);
	}

	public function getRoleByTitle($title)
	{
		return RoleRecord::finder()->findByTitle($title);
	}
	
	// -------------------- extended functions --------------------
	public function getRolesList()
	{
		return RoleRecord::finder()->findAll();
	}
}

?>